﻿@model IEnumerable<ApplicationUser>

@{
    ViewData["Title"] = "用户管理";
}

<div style="width:100%;">
    <div style="float:right;">
        <div class="row">
            <div class="col-md-10">
                <div style="padding-left:15px;">
                    <a asp-action="Create" class="btn btn-default" style="padding:6px 40px;">新建</a>
                </div>
            </div>
        </div>
    </div>
</div>

<div style="clear:both;margin-bottom:10px;"></div>
<div id="sections" class="panel panel-default">
    <div class="panel-heading">账号列表</div>
    <div class="panel-body">
        <div class="table-responsive">
            <table class="table table-striped">
                <thead>
                    <tr>
                        <th>@Html.DisplayNameFor(model => model.Name)</th>
                        <th>
                            @Html.DisplayNameFor(model => model.Avatar)
                        </th>
                        <th>
                            用户名
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.TopicCount)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.DepartmentId)
                        </th>
                        <th>
                            @Html.DisplayNameFor(model => model.LastLoginTime)
                        </th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var item in Model)
                    {
                        <tr>
                            <td>
                                @item.Name
                            </td>
                            <td>
                                @item.Avatar
                            </td>
                            <td>
                                @item.UserName
                            </td>
                            <td>
                                @item.TopicCount
                            </td>
                            <td>
                                @item.DepartmentId
                            </td>
                            <td>
                                @item.LastLoginTime
                            </td>
                            <td class="col-lg-1"><a asp-area="Admin" asp-controller="User" asp-action="Details" asp-route-id="@item.Id">详情</a></td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>
@Html.Partial("_PagerPartial", ViewData)
